﻿using System.Linq;

namespace Citi.EmailSender.Domain
{
    public partial class Application
    {
        public Application SelectByIdOrName(int id, string name)
        {
            return SelectAllActive<Application>()
                .FirstOrDefault(x => x.Id == id || x.Abbreviation == name || x.FullName == name || x.Acronym == name);
        }
    }
}
